<?php
/**
*
* @package RCB - R/C Booking
* @version $Id: update_db.php 6 2009-02-10 12:04:07Z scott $
* @copyright (c) 2008 Scott Deakin
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'rcb/common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();

// lets create some permissions


function add_permissions($local_perms = array(), $global_perms = array())
{
      static $auth_admin;
      if (!isset($auth_admin))
      {
         // if it's not set, include auth_admin and create an object
         if (!class_exists('auth_admin'))
         {
            global $phpbb_root_path, $phpEx;
            include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
         }
         $auth_admin = new auth_admin();
      }
      
      // now let's add 'em
      $auth_admin->acl_add_option(array(
         'local'      => (!empty($local_perms) && is_array($local_perms)) ? $local_perms : array(),
         'global'   => (!empty($global_perms) && is_array($global_perms)) ? $global_perms : array(),
      ));
}

add_permissions(false, array('rcb_book', 'rcb_chgprofile', 'u_rcb_book', 'u_rcb_chgprofile', 'a_rcb_chgmeeting'));
// add_permissions(false, array('rcb_book'));

?>
